﻿using System;
using System.Collections;
using System.Data;
using CE.Database;
using CE.Security;

/// <summary>
/// Summary description for UserFeedbackDB
/// </summary>
namespace CE.User
{
    public class UserFeedbackDB
    {
        public UserFeedbackDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(UserFeedback userfeedback)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "sprocUserFeedbackInsertUpdateSingleItem";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("@FeedbackId", userfeedback.FeedbackId);
            _sPara.Add("@RefCEUserId", userfeedback.RefCEUserId);
            _sPara.Add("@EmotionType", userfeedback.EmotionType);
            _sPara.Add("@FeedbackType", userfeedback.FeedbackType);
            _sPara.Add("@Name", userfeedback.Name);
            _sPara.Add("@Email", userfeedback.Email);
            _sPara.Add("@Feedback", userfeedback.Feedback);
            _sPara.Add("@Status", userfeedback.Status);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

    }
}